package sel.me.spring.annotation.conditional;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @author shenenlu 2021年04月20日 下午16:36:59
 */
@Conditional({WindowsCondition.class,ObstinateCondition.class})
@Configuration
public class MultiConditionalBeanClassConfig {

    @Bean(name = "bill")
    public Person person1(){
        return new Person("Bill Gates",62);
    }

    @Bean("linus")
    public Person person2(){
        return new Person("Linus",48);
    }

}
